/**
 * JAVACC DEMO 1.0
 * @copy right zbxsoft company All rights reserved. 
 * @Package com.zbxsoft.platform.template.helper  
 */
package com.apache.design.template.helper;

import com.apache.design.template.TemplateManager;
import com.apache.design.util.DatabaseUtils;
import com.apache.design.util.DesignEntity;
import org.apache.log4j.Logger;

import java.sql.Connection;

/**
 * description:  
 */
public abstract class SupperTemplateManager implements TemplateManager {

	protected Logger log = Logger.getLogger(getClass());

	protected Connection getConn(DesignEntity entity){
		String jdbcUrl = entity.getParam("jdbcUrl");
		String driverClassName = entity.getParam("driverClassName");
		String user = entity.getParam("jdbcUsername");
		String pwd = entity.getParam("jdbcPassword");
		String sysEname = entity.getSysEname();
		Connection conn = DatabaseUtils.getInstance().getConnection(sysEname,jdbcUrl,driverClassName,user,pwd);
		return conn;
	}

}
